package org.yuanqiframework.yuanqi.web.auth.utils;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.reflect.MethodSignature;

import java.lang.annotation.Annotation;

public class JoinPointUtils {

    public static Annotation getAnnotation(JoinPoint joinPoint,Class<? extends Annotation> clazz){
        MethodSignature signature = (MethodSignature) joinPoint.getSignature();
        return signature.getMethod().getAnnotation(clazz);
    }
}
